package com.xinan.ollama.milvus;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 人脸搜索响应对象
 *
 * @author yz
 * @date 2023/07/26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "人脸搜索响应对象", description = "在指定人脸集合中，找到最相似的人脸")
public class FaceIdentifyRes {

    @JsonProperty("face_token")
    @ApiModelProperty(name = "face_token", value = "人脸标志")
    private String face_token;

    @JsonProperty("user_list")
    @ApiModelProperty(name = "user_list", value = "匹配的用户信息列表")
    private List<UserInfo> user_list;

    @Data
    @Builder
    public static class UserInfo {
        @JsonProperty("group_id")
        @ApiModelProperty(name = "group_id", value = "用户所属的group_id")
        private String group_id;

        @JsonProperty("user_id")
        @ApiModelProperty(name = "user_id", value = "用户的user_id")
        private String user_id;

        @JsonProperty("user_info")
        @ApiModelProperty(name = "user_info", value = "注册用户时携带的user_info")
        private String user_info;

        @JsonProperty("score")
        @ApiModelProperty(name = "score", value = "用户的匹配得分，推荐阈值80分")
        private double score;
    }

}
